package com.example.project.entity;

import java.time.LocalDateTime;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.example.project.annotation.Excel;
import com.example.project.core.domain.BaseEntity;

/**
 * 问题关联关系对象 t_issue_relations
 * 
 * @author ruoyi
 * @date 2025-11-24
 */
public class IssueRelation extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 关联ID */
    private Long id;

    /** 源问题ID */
    @Excel(name = "源问题ID")
    private Long issueFromId;

    /** 目标问题ID */
    @Excel(name = "目标问题ID")
    private Long issueToId;

    /** 关联类型 */
    @Excel(name = "关联类型")
    private String relationType;

    /** 关联描述 */
    @Excel(name = "关联描述")
    private String description;

    /** 源问题对象 */
    private Issue issueFrom;

    /** 目标问题对象 */
    private Issue issueTo;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setIssueFromId(Long issueFromId) {
        this.issueFromId = issueFromId;
    }

    public Long getIssueFromId() {
        return issueFromId;
    }

    public void setIssueToId(Long issueToId) {
        this.issueToId = issueToId;
    }

    public Long getIssueToId() {
        return issueToId;
    }

    public void setRelationType(String relationType) {
        this.relationType = relationType;
    }

    public String getRelationType() {
        return relationType;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public Issue getIssueFrom() {
        return issueFrom;
    }

    public void setIssueFrom(Issue issueFrom) {
        this.issueFrom = issueFrom;
    }

    public Issue getIssueTo() {
        return issueTo;
    }

    public void setIssueTo(Issue issueTo) {
        this.issueTo = issueTo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("issueFromId", getIssueFromId())
            .append("issueToId", getIssueToId())
            .append("relationType", getRelationType())
            .append("description", getDescription())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}